package com.wangzaiplus.test.designpattern.abstractfactory;

/**
 * @ClassName Client
 * @Description: TODO
 * @Author wgc
 * @Date 2020/06/17 11:23
 * @Version V1.0
 **/
public class Client {
    public static void main(String[] args){

         //定义两个工厂
        AbstractCreator abstractCreator1=new Creator1();
        AbstractCreator abstractCreator2=new Creator2();
        AbstractProductA productA1 = abstractCreator1.createProductA();
        AbstractProductB productB1 = abstractCreator1.createProductB();
        AbstractProductA productA2 = abstractCreator2.createProductA();
        AbstractProductB productB2 = abstractCreator2.createProductB();
        productA1.doSomething();
        productB1.doSomething();
        productA2.doSomething();
        productB2.doSomething();
    }
}
